package com.ahu.qifei.fund.controller;


import com.ahu.qifei.common.bean.ResultModel;
import com.ahu.qifei.common.service.IFundService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ShiQifei
 * @since 2020-11-20
 */
@RestController
@RequestMapping("/fund")
@Api(tags={"基金"})
public class FundController {
    @Autowired
    IFundService fundService;

    @ApiOperation("查询指定基金的某天详细信息")
    @GetMapping("/detail")
    ResultModel detail(@ApiParam(required = true,value = "基金code")@RequestParam String fundCode,
                       @ApiParam(required = true,value = "开始日期 yyyy-MM-dd") @RequestParam String startDate,
                       @ApiParam(required = true,value = "结束 yyyy-MM-dd") @RequestParam String endDate) {
        return fundService.detail(fundCode, startDate, endDate);
    }
}
